We shouldn't allow toggling menus that aren't supported by the
current session mode, but as indicators are hidden rather than
destroyed on mode switches, it is not enough to check for an
indicator's existence.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/851
}
_toggleMenu(indicator) {
- if (!indicator) // menu not supported by current session mode
- return;
+ if (!indicator || !indicator.container.visible)
+ return; // menu not supported by current session mode
let menu = indicator.menu;
if (!indicator.actor.reactive)